/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/* 
 * File:   FirstRobot.h
 * Author: czq
 *
 * Created on October 11, 2018, 9:29 AM
 */

#ifndef FIRSTROBOT_H
#define FIRSTROBOT_H
option(FirstRobot)
{
    float p = -3.0f;
    common_transition
    {
    	if (theLibCodeRelease.odometryXSum >= 3200.f)
        {
            theBehaviorStatus.firstRobotArrived = 1;
        }
        else
            theBehaviorStatus.firstRobotArrived = 0;
    }

    initial_state(walkStraight)
    {
        transition
        {
            if(theLibCodeRelease.odometryXSum >= 3200.f)
        	goto finish;
        }
        action
        {
            WalkAtRelativeSpeed(Pose2f(p * theLibCodeRelease.odometryRSum, 1.f, 0.f));
        }
    }

    state(finish)
    {
        action
	{
            Stand();
	}
    }
}


#endif /* FIRSTROBOT_H */

